// ******************************************************************************
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  gpio_apbif_c_union_define.h
// Project line  :  ICT
// Department    :  ICT Processor Chipset Development Dep
// Version       :  1.0
// Date          :  2014/9/3
// Description   :  The description of Hi1382V100 project
// Others        :  Generated automatically by nManager V4.2
// History       :  2018/03/16 17:30:46 Create file
// ******************************************************************************

#ifndef __GPIO_APBIF_C_UNION_DEFINE_H__
#define __GPIO_APBIF_C_UNION_DEFINE_H__

/* Define the union U_GPIO_SWPORT_DR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_dr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORT_DR;

/* Define the union U_GPIO_SWPORT_DDR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_ddr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORT_DDR;

/* Define the union U_GPIO_INTEN */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inten : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTEN;

/* Define the union U_GPIO_INMASK */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_intmask : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INMASK;

/* Define the union U_GPIO_INTTYPE_LEVEL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inttype_level : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTTYPE_LEVEL;

/* Define the union U_GPIO_INT_POLARITY */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_int_polarity : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INT_POLARITY;

/* Define the union U_GPIO_INTSTATUS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_intstatus : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTSTATUS;

/* Define the union U_GPIO_RAW_INTSTATUS */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_raw_intstatus : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_RAW_INTSTATUS;

/* Define the union U_GPIO_DEBOUNCE */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_debounce : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_DEBOUNCE;

/* Define the union U_GPIO_PORT_EOI */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_porta_eoi : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_PORT_EOI;

/* Define the union U_GPIO_EXT_PORT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_ext_porta_rb : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_EXT_PORT;

/* Define the union U_GPIO_LS_SYNC */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0        : 31  ; /* [31:1] */
        unsigned int    gpio_ls_sync : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_LS_SYNC;

/* Define the union U_GPIO_INTCOMB_MASK */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1             : 31  ; /* [31:1] */
        unsigned int    gpio_comb_int_msk : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTCOMB_MASK;

/* Define the union U_GPIO_SWPORTA_DR_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_dr_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORTA_DR_SET;

/* Define the union U_GPIO_SWPORTA_DR_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_dr_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORTA_DR_CLR;

/* Define the union U_GPIO_SWPORTA_DR_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_dr_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORTA_DR_ST;

/* Define the union U_GPIO_SWPORT_DDR_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_ddr_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORT_DDR_SET;

/* Define the union U_GPIO_SWPORT_DDR_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_ddr_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORT_DDR_CLR;

/* Define the union U_GPIO_SWPORT_DDR_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_swporta_ddr_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_SWPORT_DDR_ST;

/* Define the union U_GPIO_INTEN_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inten_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTEN_SET;

/* Define the union U_GPIO_INTEN_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inten_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTEN_CLR;

/* Define the union U_GPIO_INTEN_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inten_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTEN_ST;

/* Define the union U_GPIO_INMASK_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_intmask_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INMASK_SET;

/* Define the union U_GPIO_INMASK_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_intmask_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INMASK_CLR;

/* Define the union U_GPIO_INMASK_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_intmask_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INMASK_ST;

/* Define the union U_GPIO_INTTYPE_LEVEL_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inttype_level_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTTYPE_LEVEL_SET;

/* Define the union U_GPIO_INTTYPE_LEVEL_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inttype_level_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTTYPE_LEVEL_CLR;

/* Define the union U_GPIO_INTTYPE_LEVEL_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_inttype_level_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTTYPE_LEVEL_ST;

/* Define the union U_GPIO_INT_POLARITY_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_int_polarity_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INT_POLARITY_SET;

/* Define the union U_GPIO_INT_POLARITY_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_int_polarity_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INT_POLARITY_CLR;

/* Define the union U_GPIO_INT_POLARITY_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_int_polarity_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INT_POLARITY_ST;

/* Define the union U_GPIO_DEBOUNCE_SET */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_debounce_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_DEBOUNCE_SET;

/* Define the union U_GPIO_DEBOUNCE_CLR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_debounce_clr : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_DEBOUNCE_CLR;

/* Define the union U_GPIO_DEBOUNCE_ST */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_debounce_st : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_DEBOUNCE_ST;

/* Define the union U_GPIO_INTSTATUS_WL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_intstatus_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTSTATUS_WL;

/* Define the union U_GPIO_RAW_INTSTATUS_WL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_raw_intstatus_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_RAW_INTSTATUS_WL;

/* Define the union U_GPIO_PORT_EOI_WL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_porta_eoi_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_PORT_EOI_WL;

/* Define the union U_GPIO_EXT_PORT_WL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    gpio_ext_porta_rb_wl : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_EXT_PORT_WL;

/* Define the union U_GPIO_LS_SYNC_WL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2           : 31  ; /* [31:1] */
        unsigned int    gpio_ls_sync_wl : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_LS_SYNC_WL;

/* Define the union U_GPIO_INTCOMB_MASK_WL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_3                : 31  ; /* [31:1] */
        unsigned int    gpio_comb_int_msk_wl : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_GPIO_INTCOMB_MASK_WL;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_GPIO_SWPORT_DR         GPIO_SWPORT_DR         ; /* 0 */
    volatile U_GPIO_SWPORT_DDR        GPIO_SWPORT_DDR        ; /* 4 */
    volatile U_GPIO_INTEN             GPIO_INTEN             ; /* 30 */
    volatile U_GPIO_INMASK            GPIO_INMASK            ; /* 34 */
    volatile U_GPIO_INTTYPE_LEVEL     GPIO_INTTYPE_LEVEL     ; /* 38 */
    volatile U_GPIO_INT_POLARITY      GPIO_INT_POLARITY      ; /* 3C */
    volatile U_GPIO_INTSTATUS         GPIO_INTSTATUS         ; /* 40 */
    volatile U_GPIO_RAW_INTSTATUS     GPIO_RAW_INTSTATUS     ; /* 44 */
    volatile U_GPIO_DEBOUNCE          GPIO_DEBOUNCE          ; /* 48 */
    volatile U_GPIO_PORT_EOI          GPIO_PORT_EOI          ; /* 4C */
    volatile U_GPIO_EXT_PORT          GPIO_EXT_PORT          ; /* 50 */
    volatile U_GPIO_LS_SYNC           GPIO_LS_SYNC           ; /* 60 */
    volatile U_GPIO_INTCOMB_MASK      GPIO_INTCOMB_MASK      ; /* FFC */
    volatile U_GPIO_SWPORTA_DR_SET    GPIO_SWPORTA_DR_SET    ; /* 8000 */
    volatile U_GPIO_SWPORTA_DR_CLR    GPIO_SWPORTA_DR_CLR    ; /* 8004 */
    volatile U_GPIO_SWPORTA_DR_ST     GPIO_SWPORTA_DR_ST     ; /* 8008 */
    volatile U_GPIO_SWPORT_DDR_SET    GPIO_SWPORT_DDR_SET    ; /* 8010 */
    volatile U_GPIO_SWPORT_DDR_CLR    GPIO_SWPORT_DDR_CLR    ; /* 8014 */
    volatile U_GPIO_SWPORT_DDR_ST     GPIO_SWPORT_DDR_ST     ; /* 8018 */
    volatile U_GPIO_INTEN_SET         GPIO_INTEN_SET         ; /* 8020 */
    volatile U_GPIO_INTEN_CLR         GPIO_INTEN_CLR         ; /* 8024 */
    volatile U_GPIO_INTEN_ST          GPIO_INTEN_ST          ; /* 8028 */
    volatile U_GPIO_INMASK_SET        GPIO_INMASK_SET        ; /* 8030 */
    volatile U_GPIO_INMASK_CLR        GPIO_INMASK_CLR        ; /* 8034 */
    volatile U_GPIO_INMASK_ST         GPIO_INMASK_ST         ; /* 8038 */
    volatile U_GPIO_INTTYPE_LEVEL_SET GPIO_INTTYPE_LEVEL_SET ; /* 8040 */
    volatile U_GPIO_INTTYPE_LEVEL_CLR GPIO_INTTYPE_LEVEL_CLR ; /* 8044 */
    volatile U_GPIO_INTTYPE_LEVEL_ST  GPIO_INTTYPE_LEVEL_ST  ; /* 8048 */
    volatile U_GPIO_INT_POLARITY_SET  GPIO_INT_POLARITY_SET  ; /* 8050 */
    volatile U_GPIO_INT_POLARITY_CLR  GPIO_INT_POLARITY_CLR  ; /* 8054 */
    volatile U_GPIO_INT_POLARITY_ST   GPIO_INT_POLARITY_ST   ; /* 8058 */
    volatile U_GPIO_DEBOUNCE_SET      GPIO_DEBOUNCE_SET      ; /* 8060 */
    volatile U_GPIO_DEBOUNCE_CLR      GPIO_DEBOUNCE_CLR      ; /* 8064 */
    volatile U_GPIO_DEBOUNCE_ST       GPIO_DEBOUNCE_ST       ; /* 8068 */
    volatile U_GPIO_INTSTATUS_WL      GPIO_INTSTATUS_WL      ; /* 8070 */
    volatile U_GPIO_RAW_INTSTATUS_WL  GPIO_RAW_INTSTATUS_WL  ; /* 8074 */
    volatile U_GPIO_PORT_EOI_WL       GPIO_PORT_EOI_WL       ; /* 8078 */
    volatile U_GPIO_EXT_PORT_WL       GPIO_EXT_PORT_WL       ; /* 8080 */
    volatile U_GPIO_LS_SYNC_WL        GPIO_LS_SYNC_WL        ; /* 8090 */
    volatile U_GPIO_INTCOMB_MASK_WL   GPIO_INTCOMB_MASK_WL   ; /* 80A0 */

} S_gpio_apbif_REGS_TYPE;

/* Declare the struct pointor of the module gpio_apbif */
extern volatile S_gpio_apbif_REGS_TYPE *gopgpio_apbifAllReg;

/* Declare the functions that set the member value */
int iSetGPIO_SWPORT_DR_gpio_swporta_dr(unsigned int ugpio_swporta_dr);
int iSetGPIO_SWPORT_DDR_gpio_swporta_ddr(unsigned int ugpio_swporta_ddr);
int iSetGPIO_INTEN_gpio_inten(unsigned int ugpio_inten);
int iSetGPIO_INMASK_gpio_intmask(unsigned int ugpio_intmask);
int iSetGPIO_INTTYPE_LEVEL_gpio_inttype_level(unsigned int ugpio_inttype_level);
int iSetGPIO_INT_POLARITY_gpio_int_polarity(unsigned int ugpio_int_polarity);
int iSetGPIO_INTSTATUS_gpio_intstatus(unsigned int ugpio_intstatus);
int iSetGPIO_RAW_INTSTATUS_gpio_raw_intstatus(unsigned int ugpio_raw_intstatus);
int iSetGPIO_DEBOUNCE_gpio_debounce(unsigned int ugpio_debounce);
int iSetGPIO_PORT_EOI_gpio_porta_eoi(unsigned int ugpio_porta_eoi);
int iSetGPIO_EXT_PORT_gpio_ext_porta_rb(unsigned int ugpio_ext_porta_rb);
int iSetGPIO_LS_SYNC_gpio_ls_sync(unsigned int ugpio_ls_sync);
int iSetGPIO_INTCOMB_MASK_gpio_comb_int_msk(unsigned int ugpio_comb_int_msk);
int iSetGPIO_SWPORTA_DR_SET_gpio_swporta_dr_wl(unsigned int ugpio_swporta_dr_wl);
int iSetGPIO_SWPORTA_DR_CLR_gpio_swporta_dr_clr(unsigned int ugpio_swporta_dr_clr);
int iSetGPIO_SWPORTA_DR_ST_gpio_swporta_dr_st(unsigned int ugpio_swporta_dr_st);
int iSetGPIO_SWPORT_DDR_SET_gpio_swporta_ddr_wl(unsigned int ugpio_swporta_ddr_wl);
int iSetGPIO_SWPORT_DDR_CLR_gpio_swporta_ddr_clr(unsigned int ugpio_swporta_ddr_clr);
int iSetGPIO_SWPORT_DDR_ST_gpio_swporta_ddr_st(unsigned int ugpio_swporta_ddr_st);
int iSetGPIO_INTEN_SET_gpio_inten_wl(unsigned int ugpio_inten_wl);
int iSetGPIO_INTEN_CLR_gpio_inten_clr(unsigned int ugpio_inten_clr);
int iSetGPIO_INTEN_ST_gpio_inten_st(unsigned int ugpio_inten_st);
int iSetGPIO_INMASK_SET_gpio_intmask_wl(unsigned int ugpio_intmask_wl);
int iSetGPIO_INMASK_CLR_gpio_intmask_clr(unsigned int ugpio_intmask_clr);
int iSetGPIO_INMASK_ST_gpio_intmask_st(unsigned int ugpio_intmask_st);
int iSetGPIO_INTTYPE_LEVEL_SET_gpio_inttype_level_wl(unsigned int ugpio_inttype_level_wl);
int iSetGPIO_INTTYPE_LEVEL_CLR_gpio_inttype_level_clr(unsigned int ugpio_inttype_level_clr);
int iSetGPIO_INTTYPE_LEVEL_ST_gpio_inttype_level_st(unsigned int ugpio_inttype_level_st);
int iSetGPIO_INT_POLARITY_SET_gpio_int_polarity_wl(unsigned int ugpio_int_polarity_wl);
int iSetGPIO_INT_POLARITY_CLR_gpio_int_polarity_clr(unsigned int ugpio_int_polarity_clr);
int iSetGPIO_INT_POLARITY_ST_gpio_int_polarity_st(unsigned int ugpio_int_polarity_st);
int iSetGPIO_DEBOUNCE_SET_gpio_debounce_wl(unsigned int ugpio_debounce_wl);
int iSetGPIO_DEBOUNCE_CLR_gpio_debounce_clr(unsigned int ugpio_debounce_clr);
int iSetGPIO_DEBOUNCE_ST_gpio_debounce_st(unsigned int ugpio_debounce_st);
int iSetGPIO_INTSTATUS_WL_gpio_intstatus_wl(unsigned int ugpio_intstatus_wl);
int iSetGPIO_RAW_INTSTATUS_WL_gpio_raw_intstatus_wl(unsigned int ugpio_raw_intstatus_wl);
int iSetGPIO_PORT_EOI_WL_gpio_porta_eoi_wl(unsigned int ugpio_porta_eoi_wl);
int iSetGPIO_EXT_PORT_WL_gpio_ext_porta_rb_wl(unsigned int ugpio_ext_porta_rb_wl);
int iSetGPIO_LS_SYNC_WL_gpio_ls_sync_wl(unsigned int ugpio_ls_sync_wl);
int iSetGPIO_INTCOMB_MASK_WL_gpio_comb_int_msk_wl(unsigned int ugpio_comb_int_msk_wl);

#endif // __GPIO_APBIF_C_UNION_DEFINE_H__
